var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); /*** * A huge thanks to Dean Parkinson for the help with this widget */ /************************************************************************************************************ @fileoverview Slide out menu Copyright (C) 2007 Dean Parkinson This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Alf Magne Kalleland, 2007 Owner of DHTMLgoodies.com ************************************************************************************************************/ var MENUDIV_ID = "dhtmlgoodies_menu"; var SUBMENU_CLASS = 'dhtmlgoodies_subMenu'; var menuItems; var slideSpeed_out = 10; // Steps to move sub menu at a time ( higher = faster) var slideSpeed_in = 10; var delayMenuClose = 10; // Microseconds from mouseout to close of menu var slideTimeout_out = 5; // Microseconds between slide steps ( lower = faster) var slideTimeout_in = 5; // Microseconds between slide steps ( lower = faster) var xOffsetSubMenu = -10; // Offset x-position of sub menu items - use negative value if you want the sub menu to overlap main menu /* Don't change anything below here */ var indeces = new Array(); indeces[0] = 0; var isMSIE = navigator.userAgent.indexOf('MSIE')>=0?true:false; var browserVersion = parseInt(navigator.userAgent.replace(/.*?MSIE ([0-9]+?)[^0-9].*/g,'$1')); if(!browserVersion)browserVersion=1; function mouseOn(obj) { var mi = findNode(getSearchIdFromObj(obj)); if (mi) mi.mouseOn(); } function mouseOff(obj) { var mi = findNode(getSearchIdFromObj(obj)); if (mi) mi.mouseOff(); } function getSearchIdFromObj(obj) { // pull the postfix off the A link or LI tag id and return the menu item ID var objId = obj.id; var idx = objId.indexOf('_'); if (idx>=0) { return "MenuItem" + objId.substring(idx); } return null; } function slideChildMenu(aId) { var mi = findNode(aId); if (mi) mi.slideChildMenu(); } function findNode(searchId) { var result; for (var no=0;no= maxwidth) { this.finishOpeningChild(divref, ulref, maxwidth); } else { ulref.style.left = nextWidth - maxwidth + "px"; divref.style.width = nextWidth + "px"; setTimeout("slideChildMenu('" + this.getId() + "')", slideTimeout_out); } } else { nextWidth = divref.offsetWidth - slideSpeed_in; if (nextWidth <= 0) { this.finishClosingChild(divref, ulref, maxwidth); } else { ulref.style.left = nextWidth - maxwidth + "px"; divref.style.width = nextWidth + "px"; setTimeout("slideChildMenu('" + this.getId() + "')", slideTimeout_out); } } } this.finishOpeningChild = function(divref, ulref, maxwidth) { this.isChildMenuOpen = true; this.isChildMenuClosed = false; ulref.style.left = "0px"; divref.style.width = maxwidth + "px"; } this.finishClosingChild = function(divref, ulref, maxwidth) { this.isChildMenuOpen = false; this.isChildMenuClosed = true; divref.style.visibility = "hidden"; divref.style.display = "none"; divref.style.width = maxwidth + "px"; if (this.parent) this.parent.mouseOff(); } } function collectMenuNodes(menuObj) { if (!menuObj) return null; var results = new Array(); var menuUL = menuObj.getElementsByTagName('UL')[0]; var menuLI = menuUL.getElementsByTagName('LI')[0]; while(menuLI) { if(menuLI.tagName && menuLI.tagName.toLowerCase()=='li') { results[results.length] = new MenuItem(menuObj, menuUL, menuLI, 0, null); } menuLI = menuLI.nextSibling; } return results; } function initMenu() { var mainDiv = document.getElementById(MENUDIV_ID); menuItems = collectMenuNodes(mainDiv); if (menuItems) { for (var no=0;no